Compare Options

Ignoring Resources That Are Extraneous

v1.1

You may wish to exclude resources from the app’s overall sync status under certain circumstances. E.g. if they are generated by a tool. This can be done by adding this annotation on the resource you wish to exclude:

  1. metadata:
  2. annotations:
  3. argocd.argoproj.io/compare-options: IgnoreExtraneous

compare option needs pruning

Note

This only affects the sync status. If the resource’s health is degraded, then the app will also be degraded.

Kustomize has a feature that allows you to generate config maps (read more ⧉). You can set generatorOptions to add this annotation so that your app remains in sync:

  1. configMapGenerator:
  2. - name: my-map
  3. literals:
  4. - foo=bar
  5. generatorOptions:
  6. annotations:
  7. argocd.argoproj.io/compare-options: IgnoreExtraneous
  8. kind: Kustomization

Note

generatorOptions adds annotations to both config maps and secrets (read more ⧉).

You may wish to combine this with the Prune=false sync option.